export const enum CAMP {
  A = 1,
  B = 2,
  ALL = 3,
}

export const enum CampId {
  Me = 1,
  Enemy = 2,
  ALL = 3,
}
/**
 * 战场点选侠客模式
 */
export const enum ClickCtrlId {
  ClickHero = 1, //普通模式 看状态
  CardChoose = 2, //选取模式 选目标
}

export const enum RoundState {
  End = 0, //回合跟这个人没什么关系了 别人的回合了
  Start = 1, //回合开始--包括buff触发
  GetCard = 2, //抽牌阶段
  OutCard = 3, //出牌阶段
  DisCard = 4, //弃牌阶段
  Over = 5, //回合结束 阶段 补气 抽牌
}

export const enum BattleState {
  Loading = 0,
  Ready = 1, //战场已经准备完毕
  Run = 2, //跑轻功得时候
  Round = 3, //出牌得时候
  Movie = 4, //特效的时候
  End = 5, //游戏结束
}

export const enum CardHeap {
  GetHeap = 1,
  DisHeap = 2,
  Hand = 3,
  BurnHeap = 4,
  All = 5,
}

export class DragonEvent {
  public static loadReady: string = 'loadReady'; //侠客们中线位置
}

export class BattleSet {
  public static MidX: number = 0; //侠客们中线位置
  public static HeroWidth: number = 200; //单个 侠客单位 宽度
  public static HeroDeathTime: number = 0.5; //侠客 死亡动画时间
  public static HeroLabelUpWaitTime: number = 0.5; //buff 招数 字符上升最短间隔
}

export const enum MoveType {
  Null = 0,
  Quan = 1, //拳掌
  Jian = 2, //剑法
  NeiGong = 3, //内功
  AnQi = 4, //暗器
  // QingGong = 6,//轻功
  // MaxHp = 7,//最大生命值
}

export const enum CardTargetType {
  Null = 0, //无
  DamageOne = 1, //伤害单点类型
  DamageTwo = 2, //打2个 穿透
  DamageAll = 3, //打全部

  ShiedOne = 4, //点体护盾
  ShiedTAfter = 5, //2个护盾 后面的
  ShiedTBefore = 6, //2个护盾 前面的
  ShiedAll = 7, //全部护盾

  HealOne = 8, //治疗一个
  HealTAfter = 9, //治疗两个 后面的
  HealTBefore = 10, //治疗两个 前面的
  HealAll = 11, //治疗全部

  //## 特殊效果这一栏 可以在配置表里 用damageone 或者 healone 等
  EftOne = 12, //特殊效果单个
  EftTAfter = 13, //特殊效果二个 后面的
  EftTBefore = 14, //特殊效果二个 前面的
  EftAll = 15, //特殊效果全部

  DamageEvery = 16, //伤害所有人
  ShiedEvery = 17, //护盾所有人
  HealEvery = 18, //治疗所有人
  EftEvery = 19, //特殊效果所有人

  LastEnemy = 20, //敌方队伍的最后一人
}

export default interface CardUseInfo {
  target: string; //释放者
  chooseCards: string[]; //选择得卡牌,
  chooseItems: string[];
}

export const enum EftType {
  Null = 0,
  Card_Hurt = 1,
  Card_Shied = 2,
  Card_Heal = 3,
  Hit_Back = 4, //击退
  Add_Buff = 5,
  Fresh_Buff = 6, //刷新buff
  Buff_Hurt = 7,
  Buff_Shied = 8,
  Buff_Heal = 9,
  Clean_Buff = 10, //移除buff
  Card_Hurt_Miss = 11, //闪避
  Card_Hurt_Cri = 12, //暴击
  Vampire = 13, //吸血
  Card_Result_Hurt = 14, //卡牌结果值伤害
  Gold_Walk = 15, //神行
  Add_Power = 16,
}
/**
 * 不一定全
 */
export interface CommondSingleInfo {
  hero: string; //被影响
  skill: number; //释放技能id
  type: EftType; //类型
  hp: number; //血量更改
  shied: number; //盾量更改
  value: any[];
}

export interface HeroChangeInfo {
  hp: number; //血量更改
  shied: number; //盾量更改
}

export enum HeroActionMovie {
  Stand = 1,
  BeAttack = 2,
  Attack = 3,
}

export enum SkillAnimationId {
  quan = 1,
  jian = 2,
  neigong = 3,
  anqi = 4,
  zhi = 5,
  zhang = 6,
  zhua = 7,
  tui = 8,
}

export enum AnimationKey {
  stand = `c12`,
  sit = `c9`,
  beAttack = `c97`,
  zhang = `c2`,
  quan = `c1`,
  zhi = `c3`,
  jian = `c5`, //有的人物模型相当离谱
  anqi = `c10`,
  stay = `c98`, //静止
}

export enum HeroAniKey {
  shied = `dun`,
  heal = `heal`,
  xixue = `xixue`,
  clean = `clean`,
}

export enum CardTempKey {
  Vampire = `Vampire`,
  Ig_Shied = `Ig_Shied`,
  BiZhong = `BiZhong`,
  BiBao = `BiBao`,
  BaoJiFator = `BaoJiFator`,
}

export interface HeroUseCardRecordItem {
  hero: string; //英雄hid
  camp: CampId; //阵营
  card_records: string[]; //卡牌hid 记录
}

export enum BuffType {
  GainBuff = 1, //增益
  DeBuff = 2,
  NormalBuff = 3,
}
